package edu.unc.comp410.colemangeer.checkoutdemo;

import org.apache.log4j.Logger;

public class Order {
	
	private Integer OrderID;
	private Customer Orderer;
	private Cart orderAsCart;
	private String[] productList;
	private String shippingInfo;
	private String billingInfo;
	
	private static Logger log = Logger.getLogger(Order.class);
	
	public Order( Cart theCart ){
		orderAsCart = theCart;
		OrderID = produceUniqueOrderID();
		dumpToDB( orderAsCart ); //add DB check here to verify dump succeeded
		System.out.println("Order completed, thanks for your order");
	}
	
	public void dumpToDB( Cart theCartIn ){
		//dump the order details to the Database, hooray!!!
	}
	
	public Integer produceUniqueOrderID(){
		//call to a method to produce a viable Order ID 
		return 1;
	}
}
